package com.winhxd.b2c.common.domain.system.security.enums;

/**
 * 菜单配置
 *
 * @author lixiaodong
 */
public enum MenuEnum {

    /**
     * 1 首页仪表盘
     */
    OPERATION_BACKGROUND_HOME_PAGE("首页仪表盘", "/dashboard","yy-home",PermissionEnum.OPERATION_BACKGROUND_HOME_PAGE),

    /**
     * 2 基础配置
     */
    BASIC_CONFIGURATION("基础配置","","yy-jcpz", PermissionEnum.BASIC_CONFIGURATION),

    /* *
     * 2.1 基础配置-商城营业配置
    */
    MALL_BUSINESS_SETTING("商城营业设置", BASIC_CONFIGURATION, "", "/mallinfo/index", PermissionEnum.MALL_BUSINESS_SETTING),

    /* *
     *2.2 基础配置-配送方式管理
    */
    DELIVERY_INFO_MANAGEMENT("配送方式", BASIC_CONFIGURATION,"/template/module/customer/customer_delivery_info_list.json", PermissionEnum.DELIVERY_INFO_MANAGEMENT),

    /**
     * 基础配置 -页面配置
     */
    CUSTOMER_PAGE_MANAGEMENT("商城页面管理", BASIC_CONFIGURATION, "/template/module/customer/customer_page_config.json", PermissionEnum.CUSTOMER_PAGE_MANAGEMENT),

    /**
     * 3 商品管理
     */
    PRODUCT_MANAGEMENT("商品管理", "","yy-spgl", PermissionEnum.PRODUCT_MANAGEMENT),

    /* *
     * 3.1 商品管理-商品管理
    */
    PRODUCT_INFO_MANAGEMENT_LIST("商品管理", PRODUCT_MANAGEMENT, "/template/module/product/product_management.json", PermissionEnum.PRODUCT_INFO_MANAGEMENT_LIST),

    /* *
     * 3.3 商品管理-服务管理
    */
    PRODUCT_TAG_MANAGEMENT_LIST("服务管理", PRODUCT_MANAGEMENT, "/template/module/product/product_tag_manage.json", PermissionEnum.PRODUCT_TAG_MANAGEMENT_LIST),

    /* *
     * 3.4 商品管理-属性管理
    */
    PRODUCT_ATTRIBUTE_MANAGEMENT_LIST("属性管理", PRODUCT_MANAGEMENT, "/template/module/product/product_attribute_manage.json", PermissionEnum.PRODUCT_ATTRIBUTE_MANAGEMENT_LIST),

    /* *
     * 3.4 商品管理-属性管理
    */
    PRODUCT_CATEGORY_MANAGEMENT_LIST("分类管理", PRODUCT_MANAGEMENT,"", "/classifyManage/index", PermissionEnum.PRODUCT_CATEGORY_MANAGEMENT_LIST),

    /**
     * 4 订单管理
     */
    ORDER_MANAGEMENT("订单管理", "","yy-ddgl",PermissionEnum.ORDER_MANAGEMENT),
    // TODO 缺少二级菜单,请补上,应该是订单管理下面包含了订单管理和售后申请,然后是3级菜单
    ORDER_MANAGEMENT_LIST("订单列表", ORDER_MANAGEMENT,"/template/module/order/order_management_list.json",PermissionEnum.ORDER_MANAGEMENT),
    ORDER_MANAGEMENT_AFTERSALER_LIST("售后列表", ORDER_MANAGEMENT, "/template/module/order/order_aftersale_list.json", PermissionEnum.ORDER_MANAGEMENT_AFTERSALER_LIST),

    /**
     * 5 用户管理
     */
    SYSTEM_MANAGEMENT("用户管理","","yy-yhgl",  PermissionEnum.SYSTEM_MANAGEMENT),

    /* *
     * 5.1 用户管理-员工管理
    */
    SYSTEM_STAFF("员工管理", SYSTEM_MANAGEMENT, PermissionEnum.SYSTEM_STAFF),
    SYSTEM_STAFF_USER("员工管理", SYSTEM_STAFF, "/template/module/system/system_user_list.json", PermissionEnum.SYSTEM_STAFF_USER),
    SYSTEM_STAFF_ORG("部门管理", SYSTEM_STAFF, "/template/module/system/system_org_list.json", PermissionEnum.SYSTEM_STAFF_ORG),
    SYSTEM_STAFF_ROLE("权限管理", SYSTEM_STAFF, "/template/module/system/system_role_list.json", PermissionEnum.SYSTEM_STAFF_ROLE),
//    SYSTEM_STAFF_DICT("字典管理", SYSTEM_STAFF, "/template/module/system/system_dict_list.json", PermissionEnum.SYSTEM_STAFF_DICT),

    /* *
     * 5.2 用户管理-分销商管理
    */
    DISTRIBUTOR_MANAGEMENT("分销商管理",SYSTEM_MANAGEMENT, PermissionEnum.DISTRIBUTOR),
    DISTRIBUTOR_MANAGEMENT_LIST("分销商列表", DISTRIBUTOR_MANAGEMENT, "/template/module/customer/distributor_list.json", PermissionEnum.DISTRIBUTOR_LIST_MANAGEMENT),
    DISTRIBUTOR_CASH_WITHDRAWAL("提现申请", DISTRIBUTOR_MANAGEMENT, "/template/module/customer/distributor_cash_withdrawal.json", PermissionEnum.DISTRIBUTOR_WITHDRAW_MANAGEMENT),
    DISTRIBUTOR_CHANNEL_MANAGEMENT_LIST("分销渠道列表", DISTRIBUTOR_MANAGEMENT, "/template/module/customer/distributor_channel_list.json", PermissionEnum.MEMBER_MANAGEMENT),
    PRODUCT_PRICE_MANAGEMENT_LIST("价格方案管理", DISTRIBUTOR_MANAGEMENT, "/template/module/product/price_scheme_management.json", PermissionEnum.MEMBER_MANAGEMENT),

    /**
     * 5.3 用户管理-会员管理
     */
    DISTRIBUTOR_MEMBER("会员管理",SYSTEM_MANAGEMENT, PermissionEnum.MEMBER_MANAGEMENT),
    DISTRIBUTOR_MEMBER_LIST("会员列表", DISTRIBUTOR_MEMBER, "/template/module/customer/member_list.json", PermissionEnum.MEMBER_LIST),

    /**
     * 6 门店管理
     */
    STORE_MANAGEMENT("店铺管理","","yy-dpgl", PermissionEnum.STORE_MANAGEMENT),
    STORE_MANAGEMENT_LIST("店铺列表", STORE_MANAGEMENT, "/template/module/store/store_list.json", PermissionEnum.STORE_MANAGEMENT),
    SHOP_PLAN_LIST("开店方案", STORE_MANAGEMENT, "/template/module/store/shop_plan.json", PermissionEnum.STORE_MANAGEMENT);


    private String name;
    private MenuEnum parent;
    private String configKey = "";
    private String path = "";
    private String icon = "";
    private PermissionEnum[] permissions;

    MenuEnum(String name, PermissionEnum... permissions) {
        this.name = name;
        this.permissions = permissions;
    }

    MenuEnum(String name, MenuEnum parent, PermissionEnum... permissions) {
        this.name = name;
        this.parent = parent;
        this.permissions = permissions;
    }

    MenuEnum(String name, String path, String icon, PermissionEnum... permissions) {
        this.name = name;
        this.path = path;
        this.icon = icon;
        this.permissions = permissions;
    }

    MenuEnum(String name, MenuEnum parent, String configKey, PermissionEnum... permissions) {
        this.name = name;
        this.parent = parent;
        this.configKey = configKey;
        this.permissions = permissions;
    }

    MenuEnum(String name, MenuEnum parent, String configKey, String path, PermissionEnum... permissions) {
        this.name = name;
        this.parent = parent;
        this.configKey = configKey;
        this.path = path;
        this.permissions = permissions;
    }

    public String getName() {
        return name;
    }

    public MenuEnum getParent() {
        return parent;
    }

    public String getConfigKey() {
        return configKey;
    }

    public String getPath() {
        return path;
    }

    public String getIcon() {
        return icon;
    }

    public PermissionEnum[] getPermissions() {
        return permissions;
    }
}
